package com.cocotingo.snail.text;

public class RichTextParagraph {
	
	private int leftMargin, rightMargin, topMargin, bottomMargin;
	private int lineSpace;
	private int linebreakMode;
	private RichTextBlock[] text;
	
	public RichTextParagraph(RichTextParagraph paragraph) {
		this.text = new RichTextBlock[paragraph.text.length];
		for (int i = 0; i < paragraph.text.length; i++) {
			this.text[i] = new RichTextBlock(paragraph.text[i]);
		}
		leftMargin = paragraph.leftMargin;
		rightMargin = paragraph.rightMargin;
		topMargin = paragraph.topMargin;
		bottomMargin = paragraph.bottomMargin;
		lineSpace = paragraph.lineSpace;
		linebreakMode = paragraph.linebreakMode;
	}
	
	public RichTextParagraph(RichTextBlock[] text) {
		this.text = text;
		leftMargin = rightMargin = topMargin = bottomMargin = 0;
		lineSpace = 0;
		linebreakMode = RichTextView.LINEBREAK_MODE_DEFAULT;
	}
	
	public void setMargin(int leftMargin, int topMargin, int rightMargin, int bottomMargin) {
		this.leftMargin = leftMargin;
		this.topMargin = topMargin;
		this.rightMargin = rightMargin;
		this.bottomMargin = bottomMargin;
	}
	
	public int getLineSpace() {
		return lineSpace;
	}
	
	public void setLineSpace(int lineSpace) {
		this.lineSpace = lineSpace;
	}
	
	public int getLeftMargin() {
		return leftMargin;
	}
	
	public int getRightMargin() {
		return rightMargin;
	}
	
	public int getTopMargin() {
		return topMargin;
	}
	
	public int getBottomMargin() {
		return bottomMargin;
	}
	
	public void setLeftMargin(int leftMargin) {
		this.leftMargin = leftMargin;
	}
	
	public void setRightMargin(int rightMargin) {
		this.rightMargin = rightMargin;
	}
	
	public void setTopMargin(int topMargin) {
		this.topMargin = topMargin;
	}
	
	public void setBottomMargin(int bottomMargin) {
		this.bottomMargin = bottomMargin;
	}
	
	public RichTextBlock[] getText() {
		return text;
	}
	
	public void setText(RichTextBlock[] text) {
		this.text = text;
	}
	
	public int getLinebreakMode() {
		return linebreakMode;
	}
	
	public void setLinebreakMode(int linebreakMode) {
		this.linebreakMode = linebreakMode;
	}

}
